Add FindKML.cmake and resolve FFTW3 issue#7576
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR adds first-class CMake support for Huawei Kunpeng Math Library (KML) via a custom FindKML.cmake, and refactors dependency linking to address FFTW3-related configuration issues.
Changes:
- Introduce
cmake/FindKML.cmakeproviding imported targets for KML BLAS/LAPACK/ScaLAPACK and FFTW3-compatible interfaces. - Update
CMakeLists.txtto usefind_package(KML ...)whenUSE_KMLis enabled and to restructure FFTW3 linking. - Adjust FFTW toolchain environment exports in
install_fftw.sh(removingCPATHandCP_*flag exports).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| toolchain/scripts/stage3/install_fftw.sh | Removes CPATH/CP_* environment exports for FFTW, affecting how downstream builds pick up FFTW headers/flags. |
| cmake/FindKML.cmake | Adds a new find-module that detects KML variants/components and defines imported targets. |
| CMakeLists.txt | Switches KML integration to find_package(KML ...) and refactors dependency linking (MPI/MKL/FFTW3). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@QuantumMisaka Please have a look if a bare build with FFTW support passes your test. |
|
I am missing something. The issue #7567 should be resolved together in this PR. |
ZhouXY-PKU
left a comment
There was a problem hiding this comment.
Nice job! Thanks for your contribution!
FindMKL.cmaketo improve the robustness of package discovery.fftw3fonly whenENABLE_FLOAT_FFTWis triggered; closes [Code scan] Do not require fftw3f when ENABLE_FLOAT_FFTW is off #7567.